
#
# ql dll makefile
#

CC              = gcc
INCLUDES	= -I.
DEFINES		= -DWIN32 -D_DEBUG
CFLAGS          = -g -O1 -Wall $(DEFINES) $(INCLUDES)
LPATH           = -L.
LIBS            = -lkernel32

TARGET		= ql.dll
IMPTARGET       = libql-shared.a

LFLAGS		= -Wl,--out-implib,$(IMPTARGET) -shared $(LPATH) $(LIBS)
LINKER		= gcc

# targets
all: $(TARGET)

clean:
	rm *.o $(TARGET) $(IMPTARGET) $(DEFTARGET)
	
# rules
dllmain.o: dllmain.cpp procs.h
	$(CXX) $(CXXFLAGS) -c dllmain.cpp -o dllmain.o
	
procs.o: procs.cpp procs.h
	$(CXX) $(CXXFLAGS) -c procs.cpp -o procs.o
	
$(TARGET): procs.o dllmain.o
	$(LINKER) procs.o dllmain.o $(LFLAGS) -o $(TARGET)
	
